// 设置数据
// 打开loading动画
export const openLoading =(state)=> {
	state.keepLoading = true
}
	// 关闭loading动画
export const closeLoading= (state)=> {
	state.keepLoading = false
}
// 设置是否滚动消息到底部状态
export const setScrollDialogMessage = (state, data) => {
	state.scrollDialogMessage = data
}
// 设置event-stream是否在输出
export const setStreamOutputStatus = (state, data) =>{
	state.streamOutputing = data
}
// 设置消息列表
export const setAiDialogList = (state, data) => {
	state.aiDialogList = data
}
// 新增消息项
export const pushAiDialogItem = (state, data) => {
  state.aiDialogList.push(data)
}
// 更新消息项
export const updateAiDialogItem = (state, data) => {
	let itemIndex = state.aiDialogList.length - 1
	let item = state.aiDialogList[itemIndex]
	item = Object.assign({}, item, data)
	state.aiDialogList.splice(itemIndex, 1, item)
}
// 设置parentMessageId
export const setParentMessageId = (state, data) => {
	state.parentMessageId = data
}